 <?
if (!defined('baseinfo')) {
    exitdata();
}   
?>

<div class="subB clTxt1 fs05 clBg4">
    <div class="wrpSubB mainSB">
        <div class="ttlB cutTxt">Gamification</div>
    </div>
</div>

<div class="wrprGame">
    <div class="wrpGame clearfix">
        <div class="hiwGame">
            <div class="imgHiw">
                <img alt="img" src="img/game.jpg">
            </div>
        </div>
        <div class="wrpGamePoint">
            <div class="gamePoint clBg5 fs07 clTxt1 clearfix">
                <span class="nameShopCrd boldGen">You Have</span>
                <span class="nameShopCrd boldGen fs09"><?=$data['myscore']['sumall']?></span>
                <span class="nameShopCrd boldGen">Points</span>
            </div>
        </div>
        <div class="ldBrd">
            <div class="hdLdBrd">
                <span class="fs07 clTxt2 boldGen">Leaderboard</span>
            </div>
            <table class="bdLdBrd fs04">
                <tbody><tr class="clBg2">
                    <th class="fs04 boldGen">No.</th>
                    <th class="fs04 boldGen">Player</th>
                    <th class="fs04 boldGen">Point</th>
                </tr>   
                <tr class="clBd2 bdBtm clBg4">
                    <td class="ctGame">
                        <span><?=$data['myscore']['rank']?></span>
                    </td>
                    <td>
                        <a href="<?=baseinfo?>/<?=$data['myscore']['username']?>" class="agpy">
                            <div class="gpy">
                                <img alt="img" src="<?=$data['myscore']['simguser']['newpath']?>" class="gamePlayerImg">
                                <span class="gamePlayerName cutTxt clTxt2 fs03"><?=$data['myscore']['displayname']?></span>
                            </div>
                        </a>
                    </td>
                    <td class="ctGame">
                        <span><?=$data['myscore']['sumall']?></span>
                    </td>
                </tr>
                <?if(count($data['scoreall'])){
                    $k=1;
                    foreach($data['scoreall'] as $valuescore)
                    {
                
                ?>
                <tr class="clBd2 bdBtm">
                    <td class="ctGame">
                        <span><?=$k?></span>
                    </td>
                    <td>
                        <a href="<?=baseinfo?>/<?=$valuescore['username']?>" class="agpy">
                            <div class="gpy">
                                <img alt="img" src="<?=$valuescore['simguser']['newpath']?>" class="gamePlayerImg">
                                <span class="gamePlayerName cutTxt clTxt2 fs03"><?=$valuescore['displayname']?></span>
                            </div>
                        </a>
                    </td>
                    <td class="ctGame">
                        <span><?=$valuescore['sumall']?></span>
                    </td>
                </tr>
                <?
                    $k++;
                    }
                }?>

            </tbody></table>
        </div> 
    </div>
</div>

